package rudy.elevator.ui;
import java.awt.geom.*;

public  class RudyEllipse2D extends Ellipse2D {
    /**
     * The x coordinate of the upper left corner of this
     * <code>Ellipse2D</code>.
     */
    public int liftid;
    public int flowerid;
    public int flag =1;   //flag ==1  lift up  fag ==2  lift down
    public boolean ispress = false;
    public double x;

    /**
     * The y coordinate of the upper left corner of this
     * <code>Ellipse2D</code>.
     */
    public double y;

    /**
     * The overall width of this <code>Ellipse2D</code>.
     */
    public double width;

    /**
     * The overall height of the <code>Ellipse2D</code>.
     */
    public double height;

    /**
     * Constructs a new <code>Ellipse2D</code>, initialized to
     * location (0,&nbsp;0) and size (0,&nbsp;0).
     */
    public RudyEllipse2D() {
    }

    /**
     * Constructs and initializes an <code>Ellipse2D</code> from the
     * specified coordinates.
     * @param x,&nbsp;y the coordinates of the bounding rectangle
     * @param w the width of the rectangle
     * @param h the height of the rectangle
     */
    public RudyEllipse2D(double x, double y, double w, double h) {
        setFrame(x, y, w, h);
    }

    /**
     * Returns the X coordinate of the upper left corner of this
     * <code>Ellipse2D</code> in <code>double</code> precision.
     * @return the X coordinate of the upper left corner of
     * the bounding box of this <code>Ellipse2D</code>.
     */
    public double getX() {
        return x;
    }

    /**
     * Returns the Y coordinate of the upper left corner of this
     * <code>Ellipse2D</code> in <code>double</code> precision.
     * @return the Y coordinate of the upper left corner of
     * the bounding box of this <code>Ellipse2D</code>.
     */
    public double getY() {
        return y;
    }

    /**
     * Returns the overall width of this <code>Ellipse2D</code>
     * in <code>double</code> precision.
     * @return the width of this <code>Ellipse2D</code>.
     */
    public double getWidth() {
        return width;
    }

    /**
     * Returns the overall height of this <code>Ellipse2D</code>
     * in <code>double</code> precision.
     * @return the height of this <code>Ellipse2D</code>.
     */
    public double getHeight() {
        return height;
    }

    public int getLiftid() {
        return liftid;
    }

    public boolean isIspress() {
        return ispress;
    }

    public int getFlowerid() {
        return flowerid;
    }

    public int getFlag() {
        return flag;
    }

    /**
     * Determines whether or not the bounding box of this
     * <code>Ellipse2D</code> is empty.
     * @return <code>true</code> if the bounding box of this
     * <code>Ellipse2D</code> is empty;
     * <code>false</code> otherwise.
     */
    public boolean isEmpty() {
        return (width <= 0.0 || height <= 0.0);
    }

    /**
     * Sets the location and size of this <code>Ellipse2D</code>
     * to the specified <code>double</code> values.
     * @param x,&nbsp;y the specified coordinates to which to set
     * the location of the bounding box of this <code>Ellipse2D</code>
     * @param w the width to which to set the width of this
     * <code>Ellipse2D</code>
     * @param h the height to which to set the height of this
     * <code>Ellipse2D</code>
     */
    public void setFrame(double x, double y, double w, double h) {
        this.x = x;
        this.y = y;
        this.width = w;
        this.height = h;
    }

    /**
     * Returns the high precision bounding box of this
     * <code>Ellipse2D</code>.
     * @return a <code>Rectangle2D</code> that is the bounding
     * box of this <code>Ellipse2D</code>.
     */
    public Rectangle2D getBounds2D() {
        return new Rectangle2D.Double(x, y, width, height);
    }

    public void setLiftid(int liftid) {
        this.liftid = liftid;
    }

    public void setIspress(boolean ispress) {
        this.ispress = ispress;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public void setFlowerid(int flowerid) {
        this.flowerid = flowerid;
    }
}
